// stores/TableList.js
import { defineStore } from 'pinia'
import { getTeamAccount } from '@api/apis.js'

export const useTeammemberdataStore = defineStore('Teammemberdata', {
    state: () => ({
        allacountList:[],
        isLoaded: false,
        teamNo:1
    }),
    actions: {
        updatedallacountList(allacountList) {
            this.allacountList = allacountList
        },
        async getallacountList() {
            this.isLoaded = false
            try{
                const res = await getTeamAccount({contingent:this.teamNo})
                this.allacountList = res.data.data
                this.isLoaded = true
            }catch(error){
                console.log(error)
            }
        }
    }
});
